package liaotian;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;

public class ChatRecord<E> extends ArrayList<E>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	PropertyChangeSupport pcs=new PropertyChangeSupport(this);
	
	@Override
	public boolean add(E e) {
		boolean x=super.add(e);
		pcs.firePropertyChange("add", null, e);
		return x;
	}
	public void addPropChangeListener(PropertyChangeListener listener){
		pcs.addPropertyChangeListener(listener);
	}
}
